Skip to content

refactor: migrate chess client to React components with puzzles integration#105

Merged
F-Hejazi merged 29 commits intomainfrom
chess-client-migration
Dec 24, 2025
Merged

refactor: migrate chess client to React components with puzzles integration#105
F-Hejazi merged 29 commits intomainfrom
chess-client-migration

Conversation

@F-Hejazi
Copy link
Collaborator

@F-Hejazi F-Hejazi commented Dec 9, 2025

This PR migrates the chess functionality from the standalone client to native React components, removing iframe dependencies and consolidating all chess logic within the React application for seamless platform integration.

Key Changes

  • Created useChessSocket hook to manage Socket.IO connections, real-time game state synchronization, move validation, and multiplayer coordination for both lessons and puzzles
  • Updated ChessBoard component and LessonOverlay.tsx to leverage the new socket hook, replacing postMessage communication with direct React state management
  • Refactored Puzzles.tsx from iframe-based implementation to native React with computer opponent automation, puzzle move validation, and integrated hint system
  • Removed chessClient folder entirely, eliminating the Live Server dependency and external code maintenance
  • Reorganized deployment structure, updated configuration files, and added Dockerfile to the React app for containerized deployments

@F-Hejazi F-Hejazi requested review from hari-hs and yubrandon December 9, 2025 16:50
@F-Hejazi F-Hejazi force-pushed the chess-client-migration branch from 0ce4808 to 4566003 Compare December 9, 2025 17:34
@DeMentidDev
Copy link
Collaborator

DeMentidDev commented Dec 10, 2025

I noticed your CI/CD build function isn't working... I'd recommend comparing this to main's test cases for react-ystemandchess before continuing with reviewing your code, and if there are no discrepancies, then it would be ideal to update the test functions for react-ystemandchess so that it accomodates for your new changes.

if there IS discrepancies, I would suggest changing the test cases to the version you find in main, and seeing if that works.

test("stub: renders LessonOverlay without crashing", () => {
> 6 | render(
| ^
7 |
8 |
9 |

@F-Hejazi F-Hejazi force-pushed the chess-client-migration branch from 4c6148c to 17817f0 Compare December 11, 2025 20:46
@DeMentidDev
Copy link
Collaborator

While this branch runs, it would be ideal to work on the conflicts this branch has (likely through pulling the recent updates that were made to main)

@DeMentidDev
Copy link
Collaborator

Everything runs without issue. You should be ready to merge now!

@DeMentidDev
Copy link
Collaborator

I've checked your updates, and they all work without issue. You are free to merge when you are ready.

Copy link
Collaborator

@yubrandon yubrandon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge!

@F-Hejazi F-Hejazi merged commit 6e757f5 into main Dec 24, 2025
1 check passed
@F-Hejazi F-Hejazi deleted the chess-client-migration branch December 24, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants